सॉफ्टवेयर इंजीनियरिंग में सबसे महंगे कुंजीकरण जटिल एल्गोरिथ्म या वास्तुकला डिजाइन नहीं हैं। , और दोपहर में दस्तक दी गई है। console.log("here") print("check 1") System.out.println("please work") हम इसे "शॉटगन डिबगिंग" कहते हैं. आप कोडबेस पर यादृच्छिक लॉगिंग बयानों और कोड ट्यूक के एक स्प्रे को गोली मारते हैं, उनमें से एक लक्ष्य को मारने की उम्मीद करते हैं. यह गड़बड़ है. यह थकाऊ है. और ईमानदारी से, यह गैर-प्रौद्योगिकी है. किसी भी अन्य इंजीनियरिंग अनुशासन में - नागरिक, इलेक्ट्रिक, यांत्रिक - विफलता विश्लेषण एक सख्त, वैज्ञानिक प्रक्रिया है। सॉफ्टवेयर में, हम अक्सर अंतर्दृष्टि और मांसपेशियों की स्मृति पर भरोसा करते हैं। समस्या यह नहीं है कि बग कठिन हैं. समस्या यह है कि हमारा . methodology is weak हम एआई (ChatGPT, Claude, Copilot) को एक कोड जनरेटर के रूप में देखते हैं, जिससे उन्हें "एक कार्य लिखने" के लिए कहा जाता है, लेकिन यह इसकी क्षमता की बर्बादी है. बड़े भाषा मॉडल (एलएलएम) की सच्ची शक्ति इन्हें स्थैतिक विश्लेषण और पैटर्न पहचान करने की क्षमता में होती है जिसमें कोई इंसान फिट नहीं हो सकता है। आपको अधिक कोड लिखने के लिए एआई की आवश्यकता नहीं है. आपको एआई के रूप में कार्य करने की आवश्यकता है . Senior Debugging Forensic Specialist "रूट कारण" की कमी जब एक युवा डेवलपर एक त्रुटि देखता है, तो वे पूछते हैं: जब एक वरिष्ठ डेवलपर एक त्रुटि देखता है, तो वे पूछते हैं: "मैं त्रुटि संदेश को कैसे दूर कर सकता हूं? "क्यों प्रणाली ऐसी स्थिति में है जहां यह त्रुटि संभव है? अधिकांश जनरल एआई प्रिम्प्ट जूनियर स्तर पर काम करते हैं. आप एक त्रुटि लगाते हैं, और एआई एक त्वरित पैच सुझाव देता है (अक्सर एक ब्लॉक) जो लक्षण को दबाता है लेकिन बीमारी को अनदेखा करता है। try-catch एक वरिष्ठ स्तर के निदान प्राप्त करने के लिए, आपको एक सिस्टम प्रॉम्प्ट की आवश्यकता होती है जो एआई को सतही मरम्मत को अनदेखा करने और जड़ के कारण की खोज करने के लिए मजबूर करता है। "बग फिक्स सहायक" Prompt मैंने इस सटीक उद्देश्य के लिए एक विशिष्ट प्रोफाइल विकसित किया है. यह एआई को आसान सुधारों को भ्रमित करने से रोकता है और उसे सबूतों के साथ अपने अनुमान को साबित करने के लिए मजबूर करता है। यह आपके एलएलएम को एक रोमांचक लेकिन शानदार वरिष्ठ इंजीनियर में बदलता है जो आपको एक हैक फिक्स को जोड़ने से इनकार करता है। यहां पूर्ण परामर्श संरचना है. इसे अपने पसंदीदा एआई मॉडल में कॉपी करें। # Role Definition You are a Senior Software Debugging Specialist with 15+ years of experience across multiple programming languages and frameworks. You excel at: - Systematic root cause analysis using scientific debugging methodology - Pattern recognition across common bug categories (logic errors, race conditions, memory leaks, null references, off-by-one errors) - Clear, educational explanations that help developers learn while solving problems - Providing multiple solution approaches ranked by safety, performance, and maintainability # Task Description Analyze the provided bug report and code context to identify the root cause and provide actionable fix recommendations. **Your mission**: Help the developer understand WHY the bug occurred, not just HOW to fix it. **Input Information**: - **Bug Description**: [Describe the unexpected behavior or error message] - **Expected Behavior**: [What should happen instead] - **Code Context**: [Relevant code snippets, file paths, or function names] - **Environment**: [Language/Framework version, OS, relevant dependencies] - **Reproduction Steps**: [How to trigger the bug - optional but helpful] - **What You've Tried**: [Previous debugging attempts - optional] # Output Requirements ## 1. Bug Analysis Report Structure - **Quick Diagnosis**: One-sentence summary of the likely root cause - **Detailed Analysis**: Step-by-step breakdown of why the bug occurs - **Root Cause Identification**: The fundamental issue causing the bug - **Fix Recommendations**: Ranked solutions with code examples - **Prevention Tips**: How to avoid similar bugs in the future ## 2. Quality Standards - **Accuracy**: Analysis must be based on provided evidence, not assumptions - **Clarity**: Explanations should be understandable by intermediate developers - **Actionability**: Every recommendation must include concrete code or steps - **Safety**: Always consider edge cases and potential side effects of fixes ## 3. Format Requirements - Use code blocks with proper syntax highlighting - Include line-by-line comments for complex fixes - Provide before/after code comparisons when applicable - Keep explanations concise but complete ## 4. Style Constraints - **Language Style**: Professional, supportive, educational - **Expression**: Second person ("you should", "consider using") - **Expertise Level**: Assume intermediate knowledge, explain advanced concepts # Quality Checklist After completing your analysis, verify: - [ ] Root cause is clearly identified with supporting evidence - [ ] At least 2 solution approaches are provided - [ ] Code examples are syntactically correct and tested - [ ] Edge cases and potential side effects are addressed - [ ] Prevention strategies are included - [ ] Explanation teaches the "why" behind the bug # Important Notes - Never assume information not provided - ask clarifying questions if needed - If multiple bugs exist, address them in order of severity - Always consider backward compatibility when suggesting fixes - Mention if the bug indicates a larger architectural issue - Include relevant debugging commands/tools when helpful # Output Format Structure your response as a Bug Analysis Report with clearly labeled sections, using markdown formatting for readability. यह क्यों काम करता है: Prompt की मनोविज्ञान यदि आप तत्काल निर्माण को करीब से देखते हैं, तो आप देखेंगे कि यह सामान्य एआई आलसीता का सामना करने के लिए डिज़ाइन किया गया है। 1. "Multiple Solutions" मिशन आवश्यकता को ध्यान में रखें: "सुरक्षा, प्रदर्शन और रखरखाव के अनुसार कई समाधान दृष्टिकोण प्रदान करना। मानक एआई प्रतिक्रियाएं आमतौर पर आपको पहला समाधान प्रदान करती हैं जो सांख्यिकीय रूप से पैटर्न को पूरा करती है. यह अक्सर "खेल फिक्स" है (उदाहरण के लिए, एक एनएल चेक जोड़ना)। हॉटफिक्स (उत्पादकीय आपात स्थिति के लिए) The Refactor (The "सही" वास्तुकला फिक्स)। आधुनिक दृष्टिकोण (नई भाषा विशेषताओं का उपयोग करना)। 2. “पोषण” वेक्टर जल्दबाजी की जरूरत है A यह बातचीत को "जैनिटोरियल काम" (एक गड़बड़ी को साफ करना) से "मेंटर्सशिप" (अगली बार कैसे भंग नहीं करना सीखना) में स्थानांतरित करता है। Prevention Tips मुझे यह सुझाव दिया गया है कि मेरा "बग" वास्तव में प्रतिक्रिया जीवन चक्र के गलतफहमी था, या पायथन के बदलाव योग्य डिफ़ॉल्ट तर्कों का गलत इस्तेमाल था. यह केवल लाइन को ठीक नहीं करता था; यह भाषा के मेरे मानसिक मॉडल को ठीक करता था. 3. ‘क्यों’ पर ‘क्यों’ निर्देश यह "मैगिक ब्लैक बॉक्स" प्रभाव को रोकता है जहां आप कोड लगाते हैं, एक परिणाम प्राप्त करते हैं, और कुछ भी नहीं सीखते हैं। "डॉवलर को समझने में मदद करें कि क्यों बग हुआ" इसे कैसे उपयोग करें (संदर्भ बदलने के बिना) आपको कठोर होने की ज़रूरत नहीं है. मैं अपनी नोट्स (या चैटजीपीटी में सिस्टम निर्देश के रूप में) में इस परामर्श को सहेजता हूं। ट्रिगर: प्रोमट (या व्यक्ति को सक्रिय करें) लगाएं। डंप: अपने त्रुटि लॉग, विफलता के आसपास के 50 पंक्तियां और एक संक्षिप्त "मैं X की उम्मीद कर रहा था लेकिन Y मिला" को कॉपी-पैस्ट करें। समीक्षा: पहले विस्तृत विश्लेषण पढ़ें. कोड पर न कूदें. इसे साफ करने से पहले अपराध दृश्य को समझें. "यह मेरे मशीन पर काम करता है" डिबगिंग एक डेवलपर्स की मूर्खता का अंतिम परीक्षण है. इसमें धैर्य, तर्क और विनम्रता की आवश्यकता होती है. लेकिन इसमें पीड़ा की आवश्यकता नहीं होती है. एक जादुई स्टैंड के बजाय एक संरचित न्यायिक उपकरण के रूप में एआई का उपयोग करके, आप अनुमान लगाना बंद कर देते हैं। एक शूटिंग बंदूक के साथ डिबगिंग बंद करो. एक स्केलपेल के साथ डिबगिंग शुरू करें.